/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package thienphuc.patient.dao.impl;

import java.util.List;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
import thienphuc.patient.dao.AbstractHibernateDaoSupport;
import thienphuc.patient.dao.TrieuChungDAO;
import thienphuc.patient.dto.TrieuChung;

/**
 *
 * @author QuocDat
 */
public class TrieuChungDAOImpl extends AbstractHibernateDaoSupport<TrieuChung, Integer> implements TrieuChungDAO {

    public TrieuChungDAOImpl(Class<TrieuChung> classPersistent) {
        super(classPersistent);
    }

    public List<TrieuChung> findByTenTrieuChung(String tenTrieuChung) throws Exception {
        Criterion criterionTenTrieuChung = Restrictions.like(TRIEU_CHUNG_TEN_TRIEU_CHUNG, "%" + tenTrieuChung + "%");
        return this.findByCriteria(criterionTenTrieuChung);
    }
}
